
function WriteCookie (cookieName, cookieValue, expiry)   
{   
var expDate = new Date();   
if(expiry)   
{   
expDate.setTime (expDate.getTime() + expiry);   
document.cookie = cookieName + "=" + escape (cookieValue) + "; path=/ expires=" + expDate.toGMTString();   
}   
else   
{   
document.cookie = cookieName + "=" + escape (cookieValue);   
}   
}   
function ReadCookie(name){   
var cookieValue = "";   
var search = name + "=";   
if(document.cookie.length > 0) {   
offset = document.cookie.indexOf(search);   
if (offset != -1) {   
offset += search.length;   
end = document.cookie.indexOf(";", offset);   
if (end == -1) end = document.cookie.length;   
cookieValue = unescape(document.cookie.substring(offset, end))   
}   
}   
return cookieValue;   
}   
var cookieEnabled=(navigator.cookieEnabled)? true : false                   
if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){                   
document.cookie = "testcookie"                   
cookieEnabled=(document.cookie=="testcookie")? true : false                   
document.cookie = ""                   
}                   
var firstshow;                   
var visittotal;                  
if(cookieEnabled==true)                   
{                   
var CFCountShowCookie=ReadCookie("CFCountShowCookie");                               
var CFCountVisitTotalCookie=ReadCookie("CFCountVisitTotalCookie");                   
var CFCountGGCookie=ReadCookie("CFCountGGCookie");
if(CFCountShowCookie=="")                   
{                   
a=new Date();                   
h=a.getHours();                   
m=a.getMinutes();                   
s=a.getSeconds();                   
sparetime=1000*60*60*24*1-(h*3600+m*60+s)*1000-1;                   
WriteCookie('CFCountShowCookie',"1",sparetime);                   
firstshow=1;                   
}                   
else                   
{                   
firstshow=0;                   
}                   
if(CFCountVisitTotalCookie=="")                   
{                   
sparetime=1000*60*60*24*3650;                   
WriteCookie('CFCountVisitTotalCookie',"1",sparetime);                   
visittotal=1;                   
}                   
else                
{                   
if(firstshow==1)   
{                  
visittotal=parseInt(CFCountVisitTotalCookie,10)+1;   
sparetime=1000*60*60*24*3650;                   
WriteCookie('CFCountVisitTotalCookie',visittotal,sparetime);                   
}                 
else                 
{                 
visittotal=parseInt(CFCountVisitTotalCookie,10);   
}                 
}
if(CFCountGGCookie=="")
{
sparetime=1000*60*60*24*3650;
WriteCookie('CFCountGGCookie',"1",sparetime);
gg=1;
}
else
{
gg=0;
}
}                   
else                   
{                   
firstshow=0;                   
visittotal=1;
gg=0;
}                   
var ly=escape(document.referrer);           
var currweb=location.href;                  
ly=escape(ly);                              
currweb=escape(currweb);                    
document.write('<script src=http://stat.08.gs/CF.asp?Action=countget_2&UserName=about&FirstShow='+firstshow+'&VisitTotal='+visittotal+'&GG='+gg+'&Ly='+ly+'&CurrWeb='+currweb+'></script>');
